
const cities = ["桂林","广州","深圳"]
const Books = [{"name": "曾国藩传","wordCount": "28.2万"},
               {"name": "卡片笔记写作法","wordCount": "10.6万"}]

const person = {"name": "胖卡","age": 18,"hobbies": ["Java","JS","Python"]}

// 将JS对象转化为字符出
let result = JSON.stringify(cities)  // ["桂林","广州","深圳"]
result = JSON.stringify(Books) // [{"name":"曾国藩传","wordCount":"28.2万"},{"name":"卡片笔记写作法","wordCount":"10.6万"}]
result = JSON.stringify(person) // {"name":"胖卡","age":18,"hobbies":["Java","JS","Python"]}

// console.log(result);
